<template>
  <div>
    <el-container>
      <el-header>
         <el-radio-group v-model="isCollapse">
          <el-radio-button :label="false">展开</el-radio-button>
          <el-radio-button :label="true">收起</el-radio-button>
        </el-radio-group>
        <div class="my-header">
          <el-menu class="el-menu-demo" mode="horizontal">
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-user-solid"></i>管理员
              </template>
              <el-menu-item index="2-1">
                <i class="el-icon-error"></i>退出
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </div>
      </el-header>
      <el-container>
        
        <Menu :isCollapse="isCollapse"></Menu>
        <el-container>
          <el-main>
            <transition name="el-fade-in">
              <!--这里的router-view用来渲染子页面-->
              <router-view></router-view>
            </transition>
          </el-main>
          <el-footer style='height:40px;'>DESIGNED BY ML</el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Menu from "@/views/menu/menu";
export default {
  components: {
    Menu
  },
  data() {
    return {
      isCollapse:true
    };
  }
};
</script>

<style lang='scss' scoped>
.el-footer {
  background-color: #fff;
  color: #888;
  text-align: center;
  line-height: 40px;
  font-size: 12px;
  border: 1px solid #f4f4f4;
}
.el-header {
  position: relative;
  border-bottom: 1px solid #f4f4f4;
}
.el-header .my-header {
  position: absolute;
  right: 0;
  top: 0;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  opacity: 0.8;
}
.data-container {
  background: #fff;
}
.el-container {
  height: 100vh;
  .el-radio-group {
    height: 0;
  }
}
</style>
